home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_ImportInt / ImportApp.h < prev    next >
Encoding:
Text File  |  1992-12-19  |  2.8 KB  |  107 lines

  1.  
  2. /*
  3.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  4.  *
  5.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  6.  *    System Software Development Kit from Adobe Systems Incorporated,
  7.  *    then this copy is designated as Development Software and its use is
  8.  *    subject to the terms of the License Agreement attached to such Kit.
  9.  *
  10.  * (c)  If this Sample Code is distributed independently, then the following
  11.  *    terms apply:
  12.  *
  13.  * (d)  This file may be freely copied and redistributed as long as:
  14.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  15.  *    2) If the file has been modified in any way, a notice of such
  16.  *      modification is conspicuously indicated.
  17.  *
  18.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  19.  *    Adobe Systems Incorporated.
  20.  * 
  21.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  22.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  23.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  24.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  25.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  26.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  27.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  28.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  29.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  30.  *    OF THIRD PARTY RIGHTS.
  31.  */
  32.  
  33. /*
  34.  *    ImportApp.h
  35.  *
  36.  *    This class performs some of the global functions necessary to
  37.  *    manage the application.
  38.  *
  39.  *    Version:    2.0
  40.  *    Author:    Ken Fromm
  41.  *    History:
  42.  *            03-07-91        Added this comment.
  43.  */
  44.  
  45. #import <appkit/Application.h>
  46.  
  47. #define  PTS_BUFFER        32
  48. #define  OPS_BUFFER        18
  49.  
  50. #define  PTS_HITPOINT    12
  51. #define  OPS_HITPOINT    6
  52.  
  53. #define  OP_SELECT        0
  54. #define  OP_IMPORT        1
  55.  
  56. #define Notify(title, msg) NXRunAlertPanel(title, msg, "OK", NULL, NULL)
  57.  
  58. typedef struct _UPath {
  59.     float     * pts;
  60.     int        num_pts;
  61.     char        *ops;
  62.     int        num_ops;
  63. } UPath;
  64.     
  65. @interface ImportApp : Application
  66. {
  67.     id        resourcePanel,    /* the id of the resourcePanel */
  68.             importId,            /* the id of the import cursor */
  69.             documentId;        /* the id of the current document */
  70.  
  71.     int        operation;        /* the current operation. */
  72.  
  73.     BOOL    contextFlag,        /* use a separate context for eps files */
  74.             showEpsfFlag,     /* show the epsf buffering windows */
  75.             tracingFlag;        /* determines whether tracing should be turned on */
  76.  
  77.     UPath    hitPoint,            /* a global user path structure for the hit detection pt. */
  78.             upathBuffer;        /* a buffer for holding data for the server */
  79. }
  80.  
  81. + new;
  82.  
  83. - free;
  84. - initializeSelf;
  85.  
  86. - setSaveAccessory:anObject;
  87.  
  88. - setContextFlag:sender;
  89. - (BOOL) contextFlag;
  90. - setShowEpsfFlag:sender;
  91. - (BOOL) showEpsfFlag;
  92. - setTracingFlag:sender;
  93. - (BOOL) tracingFlag;
  94.  
  95. - (UPath *) hitPoint;
  96. - (UPath *) upathBuffer;
  97.  
  98. - resourcePanel;
  99. - cursor;
  100. - setOperation:(int) op;
  101. - (int) operation;
  102.  
  103. - appDidInit:sender;
  104.  
  105. @end
  106.  
  107.